#ifndef __APP_DATA_H__
#define __APP_DATA_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <libl.h>



//Public Defines
#define PARA_ID_VERSOFT			0x8000

#define PARA_ID_AISGUID			0x1000
#define PARA_ID_DEBUG			0x1100

#define PARA_ID_DEVICEDATA		0x1200

#define PARA_ID_BEAR_SAVE		0x1250
#define PARA_ID_BEAR_CNT		0x1251
#define PARA_ID_BEAR_DATA		0x1260

#define PARA_ID_CALI_QTY		0x1300
#define PARA_ID_CALI_VALUE		0x2000

#define PARA_ID_F04_DEFAULT		0x3000
#define PARA_ID_F04_WORK		0x3010
#define PARA_ID_F05_LEN			0x3100


#define IAP_ADR_BEGIN			0x08051000
#define IAP_ADR_END				0x080A0000
#define IAP_ADR_FLAG			0x08001000
#define IAP_SIZE				(IAP_ADR_END - IAP_ADR_BEGIN)

//Public Typedefs



//External Functions
void data_Init(void);

void iap_Init(void);
size_t iap_UpData(size_t offset, const void *data, size_t len);
size_t iap_UpEnd(size_t alen);

u32 para_Get(sfs_id_t id);
u32 para_GetDef(sfs_id_t id, u32 def);
void para_Set(sfs_id_t id, u32 data);
int para_Read(sfs_id_t id, void *data, size_t len);
void para_Write(sfs_id_t id, const void *data, size_t len);

#ifdef __cplusplus
}
#endif

#endif





